package com.hspedu.newData.dmsxl.数组.二分查找;
/**
 * @Author: yh
 * @description: 
 * @CreateTime: 2025-05-15 
 * @Version: 1.0
 */

public class LC153寻找旋转排序数组中的最小值 {

    // todo
    // 没看明白
    public int findMin(int[] nums) {

        int low = 0;
        int high = nums.length - 1;
        while (low<high){
            int mid = low + (high - low) /2;
            if (nums[mid] < nums[high]){
                high = mid;
            }else {
                low = mid + 1;
            }
        }

        return nums[low];

    }
}
